import { methods } from "../uni_modules/uview-ui/libs/mixin/mixin.js";
import http from "./http.js";

//上传图片
export const uploadImg = http.BASE_URL + "/api/common/upload";

//登录
export function resize(data){
	return http.request(
	    {
	        url: "/api/login/user",
			method:"get",
	    },
	    data,
	    true
	);
}
//登记信息
export function edituserinfo(data){
	return http.request(
	    {
	        url: "/api/user/edituserinfo",
	    },
	    data,
	    true
	);
}

//获取banner数据
export function getBanner(data){
	return http.request(
	    {
	        url: "/api/index/banner",
	    },
	    data,
	    true
	);
}

//系统公告
export function getnotices(data){
	return http.request(
	    {
	        url: "/api/index/getnotices",
	    },
	    data,
	    true
	);
}

//获取系统公告详情
export function noticesdetail(data){
	return http.request(
	    {
	        url: "/api/index/noticesdetail",
	    },
	    data,
	    true
	);
}

//获取用户信息
export function getuserinfo(data){
	return http.request(
	    {
	        url: "/api/user/getuserinfo",
	    },
	    data,
	    true
	);
}

//获取资讯列表
export function getinformation(data){
	return http.request(
	    {
	        url: "/api/index/getinformation",
	    },
	    data,
	    true
	);
}

//点赞资讯
export function zaninformation(data){
	return http.request(
	    {
	        url: "/api/index/zaninformation",
	    },
	    data,
	    true
	);
}
//获取历史答题列表
export function userquestionlogs(data){
	return http.request(
	    {
	        url: "/api/user/userquestionlogs",
	    },
	    data,
	    true
	);
}

//错题本
export function wrongBook(data){
	return http.request(
	    {
	        url: "/api/user/wrong_book",
	    },
	    data,
	    true
	);
}

//获取题目详情
export function questiondetail(data){
	return http.request(
	    {
	        url: "/api/user/questiondetail",
	    },
	    data,
	    true
	);
}

//纠正错题本
export function editwrongBook(data){
	return http.request(
	    {
	        url: "/api/user/editwrong_book",
	    },
	    data,
	    true
	);
}

//意见反馈
export function feedback(data){
	return http.request(
	    {
	        url: "/api/index/feedback",
	    },
	    data,
	    true
	);
}


//题目列表
export function questionList(data){
	return http.request(
	    {
	        url: "/api/user/question_list",
	    },
	    data,
	    true
	);
}

//用户答题列表
export function writequestionlogs(data){
	return http.request(
	    {
	        url: "/api/user/writequestionlogs",
	    },
	    data,
	    true
	);
}

//排行榜
export function ranktop(data){
	return http.request(
	    {
	        url: "/api/user/ranktop",
	    },
	    data,
	    true
	);
}

//我的积分
export function userintegral(data){
	return http.request(
	    {
	        url: "/api/user/userintegral",
	    },
	    data,
	    true
	);
}

//积分说明
export function getsettings(data){
	return http.request(
	    {
	        url: "/api/index/getsettings",
	    },
	    data,
	    true
	);
}

//历史答题
export function wrongbook(data){
	return http.request(
	    {
	        url: "/api/user/wrong_book",
	    },
	    data,
	    true
	);
}

//本次答题错题本
export function questionwrongbook(data){
	return http.request(
	    {
	        url: "/api/user/question_wrong_book",
	    },
	    data,
	    true
	);
}

//用户资料编辑s
export function edituserinfos(data){
	return http.request(
	    {
	        url: "/api/user/edituserinfo",
	    },
	    data,
	    true
	);
}

//获取openID
export function getopenid(data){
	return http.request(
	    {
	        url: "/api/login/getopenid ",
	    },
	    data,
	    true
	);
}